/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package GUI;



/**
 *
 * @author panos
 */
public class AdminCentralForm extends javax.swing.JFrame {

    
    
    /**
     * Creates new form AdminCentralForm
     */  
    
    public AdminCentralForm() {
        
     
      
        initComponents();
        
    }
    
      

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jLabel1 = new javax.swing.JLabel();
        btnLogout = new javax.swing.JButton();
        jLabel2 = new javax.swing.JLabel();
        jLabel3 = new javax.swing.JLabel();
        jMenuBar1 = new javax.swing.JMenuBar();
        Manage = new javax.swing.JMenu();
        ManageStores = new javax.swing.JMenuItem();
        ManageProducts = new javax.swing.JMenuItem();
        ManageCustomerProfile = new javax.swing.JMenuItem();
        ProductStore = new javax.swing.JMenuItem();
        jMenu2 = new javax.swing.JMenu();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setTitle("Αρχική Οθόνη Διαχειριστή");
        setResizable(false);

        jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/logo1.jpg"))); // NOI18N

        btnLogout.setText("Αποσύνδεση / Logout");
        btnLogout.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnLogoutActionPerformed(evt);
            }
        });

        jLabel2.setText("Επιτυχής σύνδεση Διαχειριστή Συστήματος");

        jLabel3.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/admin small.jpg"))); // NOI18N

        Manage.setText("Διαχείριση");

        ManageStores.setText("Διαχείριση καταστημάτων");
        ManageStores.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                ManageStoresActionPerformed(evt);
            }
        });
        Manage.add(ManageStores);

        ManageProducts.setText("Διαχείριση προϊόντων");
        ManageProducts.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                ManageProductsActionPerformed(evt);
            }
        });
        Manage.add(ManageProducts);

        ManageCustomerProfile.setText("Διαχείριση προφίλ πελατών");
        ManageCustomerProfile.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                ManageCustomerProfileActionPerformed(evt);
            }
        });
        Manage.add(ManageCustomerProfile);

        ProductStore.setText("Συσχέτιση προϊόντων και καταστημάτων");
        ProductStore.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                ProductStoreActionPerformed(evt);
            }
        });
        Manage.add(ProductStore);

        jMenuBar1.add(Manage);
        jMenuBar1.add(jMenu2);

        setJMenuBar(jMenuBar1);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addGap(0, 0, Short.MAX_VALUE)
                .addComponent(jLabel1))
            .addGroup(layout.createSequentialGroup()
                .addGap(236, 236, 236)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jLabel2)
                    .addComponent(jLabel3)
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(btnLogout)
                        .addGap(46, 46, 46)))
                .addGap(0, 264, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addGap(74, 74, 74)
                .addComponent(jLabel2)
                .addGap(18, 18, 18)
                .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 213, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addComponent(btnLogout)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(jLabel1))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void ManageProductsActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_ManageProductsActionPerformed
       new ProductForm().setVisible(true);
              dispose();
    }//GEN-LAST:event_ManageProductsActionPerformed

    private void ManageCustomerProfileActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_ManageCustomerProfileActionPerformed
       new ManageCustomersForm().setVisible(true);       
       dispose();
       
    }//GEN-LAST:event_ManageCustomerProfileActionPerformed

    private void ManageStoresActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_ManageStoresActionPerformed
        
        new AdminManageStoresForm().setVisible(true);         
         dispose();
    }//GEN-LAST:event_ManageStoresActionPerformed

    private void ProductStoreActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_ProductStoreActionPerformed
       new AdminProductStoreForm().setVisible(true);
               dispose();
    }//GEN-LAST:event_ProductStoreActionPerformed

    private void btnLogoutActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnLogoutActionPerformed
       new LogoutForm().setVisible(true);
       
    }//GEN-LAST:event_btnLogoutActionPerformed

    /**
     * @param args the command line arguments                                                                      
     */
    public static void main(String args[]) {
        /* Set the Nimbus look and feel */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(AdminCentralForm.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(AdminCentralForm.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(AdminCentralForm.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(AdminCentralForm.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /* Create and display the form */
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new AdminCentralForm().setVisible(true);
            }
        });
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JMenu Manage;
    private javax.swing.JMenuItem ManageCustomerProfile;
    private javax.swing.JMenuItem ManageProducts;
    private javax.swing.JMenuItem ManageStores;
    private javax.swing.JMenuItem ProductStore;
    private javax.swing.JButton btnLogout;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JMenu jMenu2;
    private javax.swing.JMenuBar jMenuBar1;
    // End of variables declaration//GEN-END:variables
}
